//build:20240524
//To simplify the use of the gpioKey component's micro-light communication protocol, gpioKey is encapsulated within this worker. Users only need to subscribe to eventbus events to listen to gpioKey.
import log from './dxLogger.js'
import gpioKey from './dxGpioKey.js'
import std from './dxStd.js'
function run() {
    gpioKey.worker.beforeLoop()
    log.info('gpioKey start......')
    std.setInterval(() => {
        try {
            gpioKey.worker.loop()
        } catch (error) {
            log.error(error)
        }
    },10)
}

try {
    run()
} catch (error) {
    log.error(error)
}